/*
 * File: application.h - header file for the application class
 * Author: Sam Tran (tpmsam@yahoo.com), UHCL, April 2006
 */

#ifndef __APPLICATION_H
#define __APPLICATION_H

#include <omnetpp.h>
#include "globaldef.h"
#include <list>

/** Main class on top of all the protocol stack. It contains user defined code 
 * as the top application or for debugging/testing the underlying layers 
 */
class application : public cSimpleModule
{
	private:
		int temp,HARDT;
		
		// Forward message
		void forward(cMessage *msg);
		bool group_flag; //If the node joins in any cluster?

	protected:
		/** omnet++ specific code */
		Module_Class_Members(application,cSimpleModule,0);

		/** the initialization function */
		virtual void initialize();

		/** main loop function */
		virtual void handleMessage(cMessage *msg);

		virtual void finish();

};


Define_Module( application );


#endif
